@charset "UTF-8";
@import '../themes/default.scss';
@import '../mixins/index.scss';

$componentPrefix: initPrefix();
$component: #{$componentPrefix}text;

$sizes:
  (xss, $ft-font-size-xss, '非常用字号，用于特小标签 (浏览器默认不支持)'),
  (xs, $ft-font-size-xs, '非常用字号，用于标签 (浏览器默认不支持)'), (sm, $ft-font-size-sm, '用于辅助信息'),
  (md, $ft-font-size-md, '常用字号'), (df, $ft-font-size-df, '常用字号'), (lg, $ft-font-size-lg, '常规标题'),
  (xl, $ft-font-size-xl, '大标题'), (xxl, $ft-font-size-xxl, '用于大号的数字'),
  (sl, $ft-font-size-sl, '用于图标、数字等较大显示'), (xsl, $ft-font-size-xsl, '用于图标、数字等特大显示');

$lineHeight: (cl, $ft-line-height-cl), (en, $ft-line-height-en), (zh, $ft-line-height-zh), (df, $ft-line-height-df);

#{$component} {
  @each $name, $value, $remark in $sizes {
    &-#{$name} {
      /** #{$remark} */
      font-size: $value;
    }
  }

  &-through {
    text-decoration: line-through;
  }

  &-underline {
    text-decoration: underline;
  }

  &-italic {
    font-style: italic;
  }

  &-bold {
    font-weight: bold !important;
  }

  &-cut,
  &-ellipsis-1 {
    @include line-uni(1);
  }

  &-ellipsis-2 {
    @include line-uni(2);
  }

  &-ellipsis-3 {
    @include line-uni(3);
  }

  &-ellipsis-4 {
    @include line-uni(4);
  }

  &-center {
    text-align: center !important;
  }

  &-left {
    text-align: left !important;
  }

  &-right {
    text-align: right !important;
  }

  @each $name, $value in $lineHeight {
    &-lh__#{$name} {
      line-height: $value;
    }
  }
}
/* #ifndef APP-NVUE */
#{$component} {
  &-Abc {
    // 首字母大写
    text-transform: Capitalize !important;
  }

  &-ABC {
    // 字母大写
    text-transform: Uppercase !important;
  }

  &-abc {
    // 首字母小写
    text-transform: Lowercase !important;
  }

  &-price::before,
  &-rmb::before {
    content: '¥';
    font-size: 80%;
    margin-right: 2 * $ft-point;
  }

  &-price--top::before,
  &-rmb--top::before {
    @extend #{$component}-price;
    vertical-align: top;
  }
}
/* #endif */

#{$componentPrefix}line-height-1 {
  line-height: 1;
}
